project (XMPW C)
include (CheckIncludeFile)

find_package (PkgConfig REQUIRED)
pkg_check_modules (LIBGLIB      REQUIRED glib-2.0)
pkg_check_modules (LIBCONFIG    REQUIRED libconfig)
pkg_check_modules (LIBLOUDMOUTH REQUIRED loudmouth-1.0)
include_directories(${LIBCONFIG_INCLUDE_DIRS} ${LIBLOUDMOUTH_INCLUDE_DIRS}
	${LIBGLIB_INCLUDE_DIRS})
add_executable (xmpw xmpw.c xmw/config.c xmw/proto/xmpp.c)
target_link_libraries(xmpw ${LIBCONFIG_LIBRARIES} ${LIBLOUDMOUTH_LIBRARIES}
	${LIBGLIB_LIBRARIES})
set_target_properties (xmpw
	PROPERTIES
		COMPILE_FLAGS "--std=c99")
